﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SMTPTestSuite
{
    public partial class FormSendRaw : Form
    {
        private Logging.Logger _logger = null;

        public FormSendRaw()
        {
            InitializeComponent();
            _logger = new Logging.Logger();
            _logger.LogListBox = listBoxLog;
            _logger.LogListBoxAutoScroll = true;
        }

        private void buttonClose_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void buttonSend_Click(object sender, EventArgs e)
        {
            try
            {
                SMTPSessionOutgoing oSMTPSender = new SMTPSessionOutgoing(textBoxSMTPServer.Text, Convert.ToInt32(textBoxSMTPServerPort.Text),_logger);
                oSMTPSender.SendMessage(textBoxMAILFROM.Text, textBoxRCPTTO.Text, textBoxDATA.Text);
            }
            catch { }
        }
    }
}
